package com.sayyi.demo.micro.order.convertor;

import com.sayyi.demo.micro.order.entity.OrderTbl;
import com.sayyi.demo.micro.storage.domain.UpdateStorageRequest;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

@Mapper(componentModel = "spring")
public interface OrderConvertor {

    /**
     * order转库存更新请求
     * @param orderTbl
     * @return
     */
    @Mapping(source = "id", target = "orderId")
    UpdateStorageRequest orderToStorageRequest(OrderTbl orderTbl);
}
